<template>
  <footer class="footer">
    <div class="footer-content">
      <div class="footer-section">
        <h3 class="footer-title">博客系统</h3>
        <p class="footer-description">
          现代化的博客平台，让每个人都能轻松分享自己的想法和故事。
        </p>
        <div class="social-links">
          <el-icon class="social-icon"><Github /></el-icon>
          <el-icon class="social-icon"><Twitter /></el-icon>
          <el-icon class="social-icon"><Message /></el-icon>
        </div>
      </div>
      
      <div class="footer-section">
        <h4 class="footer-subtitle">快速链接</h4>
        <ul class="footer-links">
          <li><router-link to="/">首页</router-link></li>
          <li><router-link to="/posts">文章列表</router-link></li>
          <li v-if="userStore.isLoggedIn"><router-link to="/write">写文章</router-link></li>
          <li v-else><router-link to="/login">登录</router-link></li>
        </ul>
      </div>
      
      <div class="footer-section">
        <h4 class="footer-subtitle">帮助</h4>
        <ul class="footer-links">
          <li><a href="#">使用指南</a></li>
          <li><a href="#">常见问题</a></li>
          <li><a href="#">联系我们</a></li>
          <li><a href="#">隐私政策</a></li>
        </ul>
      </div>
      
      <div class="footer-section">
        <h4 class="footer-subtitle">技术栈</h4>
        <div class="tech-stack">
          <span class="tech-tag">Vue 3</span>
          <span class="tech-tag">FastAPI</span>
          <span class="tech-tag">PostgreSQL</span>
          <span class="tech-tag">Docker</span>
        </div>
      </div>
    </div>
    
    <div class="footer-bottom">
      <p>&copy; 2024 现代化博客系统. 保留所有权利.</p>
    </div>
  </footer>
</template>

<script setup lang="ts">
import { useUserStore } from '@/stores/user'

const userStore = useUserStore()
</script>

<style scoped>
.footer {
  background: #2c3e50;
  color: white;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #3498db;
}

.footer-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ecf0f1;
}

.footer-description {
  color: #bdc3c7;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  font-size: 1.5rem;
  color: #bdc3c7;
  cursor: pointer;
  transition: color 0.3s;
}

.social-icon:hover {
  color: #3498db;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #3498db;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: #34495e;
  color: #ecf0f1;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid #34495e;
  padding: 1.5rem 20px;
  text-align: center;
  color: #bdc3c7;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .tech-stack {
    justify-content: center;
  }
}
</style>
